// 定义To-Do项的接口
export interface TodoItem {
  id: number;
  task: string;
  completed: boolean;
}

// 定义To-Do类的实现
export class Todo implements TodoItem {
  constructor(public id: number, public task: string, public completed: boolean = false) {}

  printDetails(): void {
    console.log(`${this.id}\t${this.task} ${this.completed ? "\t(completed)" : ""}`);
  }
}